package com.zoroki.hmusic.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zoroki.hmusic.entity.Song;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.data.elasticsearch.core.SearchHits;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zoroki
 * @since 2023-05-10
 */
public interface ISongService extends IService<Song> {

    int addSong(Song song);

    int deleteSong(int id);

    List<Song> getSongList(int userId);

    Page<Song> getSongPage(int userId, int currentPage, int pageSize);

    Song findSongById(int id);

    List<Song> findSongByPlaylistId(int playlistId);

    Song updateSong(Song song);

    SearchHits<Song> findSongByKeyword(String keyword);

    org.springframework.data.domain.Page<Song> getSongPageByKeyword(String keyword, int pages);

    org.springframework.data.domain.Page<Song> getNewSongFromEs(int number);
}
